import configIcon1 from '@/assets/config/config-icon1.png';
import configIcon2 from '@/assets/config/config-icon2.png';
import configIcon3 from '@/assets/config/config-icon3.png';
import configIcon4 from '@/assets/config/config-icon4.png';
import configIcon5 from '@/assets/config/config-icon5.png';
import configIcon6 from '@/assets/config/config-icon6.png';
import configIcon7 from '@/assets/config/config-icon7.png';
import configIcon8 from '@/assets/config/config-icon8.png';
import configIcon9 from '@/assets/config/config-icon9.png';
import configIcon10 from '@/assets/config/config-icon10.png';
import configIcon11 from '@/assets/config/config-icon11.png';
import configIcon12 from '@/assets/config/config-icon12.png';
import configIcon13 from '@/assets/config/config-icon13.png';
import configIcon14 from '@/assets/config/config-icon14.png';
import configIcon15 from '@/assets/config/config-icon15.png';
import emptyImg from '@/assets/indexEmpty.png';

export default {
  data() {
    return {
      emptyImg
    };
  },
  computed: {
    defaultColor() {
      return 'linear-gradient(151deg,#46b0ff 24%, #4468ff 93%)';
    },
    defaultIcon() {
      return configIcon1;
    },
    iconData() {
      return [
        { name: 'configIcon1', icon: configIcon1 },
        { name: 'configIcon2', icon: configIcon2 },
        { name: 'configIcon3', icon: configIcon3 },
        { name: 'configIcon4', icon: configIcon4 },
        { name: 'configIcon5', icon: configIcon5 },
        { name: 'configIcon6', icon: configIcon6 },
        { name: 'configIcon7', icon: configIcon7 },
        { name: 'configIcon8', icon: configIcon8 },
        { name: 'configIcon9', icon: configIcon9 },
        { name: 'configIcon10', icon: configIcon10 },
        { name: 'configIcon11', icon: configIcon11 },
        { name: 'configIcon12', icon: configIcon12 },
        { name: 'configIcon13', icon: configIcon13 },
        { name: 'configIcon14', icon: configIcon14 },
        { name: 'configIcon15', icon: configIcon15 }
      ];
    }
  },
  methods: {
    getIcon(name) {
      if (!name) return configIcon1;
      const index = this.iconData.findIndex(item => item.name === name);
      if (index !== -1) {
        return this.iconData[index].icon;
      } else {
        return configIcon1;
      }
    }
  }
};
